<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ProvinceAction
 *
 * @author eoe2005
 */
class ProvinceAction {
    /**
     *获取全部的省份信息
     * @return type
     */
    public function getProvinces(){
        $provincesmodel = getModel('Province');
        return $provincesmodel->getAllProvince();
    }
    /**
     *获取全部的城市信息
     * @return type
     */
    public function getAllCity(){
        $provincesmodel = getModel('Province');
        return $provincesmodel->getAllCity();
    }
    public function all(){
        $provincesmodel = getModel('Province');
        return $provincesmodel->all();
    }
    /**
     *根据省份获取城市信息
     * @return type
     */
    public function getCitysByProvinceId(){
        $pid = post('provinceid',0);
        if($pid > 0){
            $provincemodel = getModel('Province');
            return $provincemodel->getCitysByProvince($pid);
        }
        return Error::PARAM_ABSENCE;//缺少参数
    }
}

?>
